<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        h1{
            text-align: center;
        }
        div{
            width: 300px;
            height: 100px;
            position: relative;
            border-style: solid;
            border-width: 5px;
            border-color: blanchedalmond;
            border-radius: 10%;
            background-color: blanchedalmond;
            margin: auto;
            box-shadow: 5px 5px 10px 2px #969090;
        }
        #year{
            margin-top: 20px;
        }
        button{
            float: right;
            margin-top: 20px;
            margin-right: 10px;
        }
    </style>
    <script>
        function judgment(){
            var year = document.getElementById('year').value;
            if((year % 4 === 0 && year % 100 !== 0) || (year % 400 === 0)){
                alert(year+'是闰年');
            }
            else{
                alert(year+'不是闰年')
            }
        }
    </script>
</head>
<body>
    <h1>判断闰年</h1>
    <div>
        年份是：<input type="text" id="year">
        <button onclick="judgment()">判断</button>
    </div>
</body>
</html>